package genetic.core;

/**
 * Contract between {@link GeneticAlgorithm} and it's observers.
 *  
 * @author vasek
 *
 */
public class PopulationChangedEvent {

	private int generation;
	private double bestFitness;

	/**
	 * Constructor.
	 * 
	 * @param generation which generation is
	 * @param bestFitness best fitness
	 */
	public PopulationChangedEvent(int generation, double bestFitness) {
		this.generation = generation;
		this.bestFitness = bestFitness;
	}

	/**
	 * @return generation
	 */
	public int getGeneration() {
		return generation;
	}

	/**
	 * @return best fitness
	 */
	public double getFitness() {
		return bestFitness;
	}
}
